using System;
using System.Windows.Forms ; 
namespace WP.Commons
{
	/// <summary>
	/// As the return result for grouping quantity
	/// </summary>
	public struct QuantityGrouping
	{
		public double dOnOrder;
		public double dOnHandComm;
		public double dOnHand;
		public double dOnTransit;
        public double dBackorder;
        public double dBmIPQty;
        public double dBmQtyComm;
        public double dTransferin;
        public double dTransferout;

		//bInit is not used, only for init value	
		public QuantityGrouping(bool bInit)
		{
			this.dOnHand=0;
			this.dOnHandComm=0;
			this.dOnOrder=0;
			this.dOnTransit=0;
            this.dBackorder = 0;
            this.dBmIPQty = 0;
            this.dBmQtyComm = 0;
            this.dTransferin = 0;
            this.dTransferout = 0;
		}
	}
	public struct MenuInfo
	{
		public string strMenuId;
		public string strMenuName;
		public string strProgname;
        public string strTableName; //For lookup no menu ID form
        public string strNameSpace; 
		public string strPermit;
		public int iParameter;
		public int iPasswordLevel;
        public string strOverViewCondition;
	}


    public struct UpdateFieldInfo
    {
        public string  strEditCtrlName;
        public string  strFieldName;
        public string  strFormatStyle;
        public string  strLookUpCtrlName;
        public string  strLookUpTable;
        public string  strLookUpField;
        public string  strDeftValue;
        public string  strOldValue;
        public int     iMaxLength;
        public bool    bCanEditInEditStatus;
        public string  strToolTip;
        public bool bVisible;
        public Control control;
        public string strValidGroupName;
    }
    public struct ItemInfo
    {
        public string ItemNo;
        public string ProdType;
        public string ConversionType;
        public bool PackegeSize;
        public bool PkgSizeForTally;
        public string StockUnit;
        public string CostUnit;
        public string SaleOrderunit;
        public string SaleShipUnit;
        public double ProdLen;
        public double ProdWid;
        public double ProdLenOrg;
        public double ProdWidOrg;
        public double ProdHeight;
        public string LenUnit;
        public string WidUnit;
        public string HeightUnit;
        public double Weight;
        public string WeightUnit;
        public string Desc1;
        public string Desc2;
        public bool BeRL;
        public bool BeRW;
        public bool IsByPackage;
        public bool IsLayerItem;
        public string LocNo;
        public int iQtyScale;
        public int iCostScale;
        public int iPriceScale;
        public int iDefPksize;
        public string PlnNo;
    }
    /// <summary>
    /// this struct used to PO/RM/OE ..., when user changed the quantity unit , program will calculate new quantity by the new unit.
    /// </summary>
    public struct ItemQtyConvert
    {
        public string ItemNo;
        public double OrgQty;
        public string OrgUnit;
    }

    public struct ErrInfo
    {
        public ErrInfo(string strErrMsg,string strErrOwner)
         {
             errMsg = strErrMsg;
             errOwner = strErrOwner;
        }
        public string errMsg;
        public string errOwner;
    }

    public struct PriceInfo
    {
        public string PriceName;
        public string PriceDesc;
        public string OldValue;
        public string NewValue;
        public string OldFormula;
        public string NewFormula;
        public string ItemNo;
        public string locNo;
        public string TableName;
        public string FieldName;
        public string FormatChar;
        public bool NeedFormula;
        public string Unit;
        public bool Round;
    }

    public struct UseCostInfo
    {
        public string strItemNo;
        public string strLocNo;
        public bool blnUseWtAvgCost;
        public double dblWtAvgCost;
        public string strWtAvgCostLocNo;
        public bool blnUseEffWtAvgCost;
        public double dblEfftWtAvgCost;
        public string strEfftWtAvgCostLocNo;
    }
}
